<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
        span{
            padding: 10px;
        }
        a{
            padding: 20px;
        }
        li{
            margin: 20px;
            border: 1px solid;
        }
    </style>
  </head>
  <body>
    <a href="/addUser">添加列表</a>
    <ul>
      <% for(let i=0;i<data.length;i++){%>
        <li>
            <span>姓名：<%=data[i].name%></span>
            <span>年龄：<%=data[i].age%></span>
            <a href="/delete/<%=data[i]._id%>">删除</a>
            <a href="/updata?id=<%=data[i]._id%>">修改</a>
        </li>
        <%}%>
    </ul>
  </body>
</html>
